package com.ruoyi.project.service.impl;

import java.util.List;

import com.ruoyi.common.datascope.annotation.DataScope;
import com.ruoyi.project.domain.CxcyTransformation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.CxcyTransformationMapper;
import com.ruoyi.project.service.ICxcyTransformationService;

/**
 * 成果转化申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-10
 */
@Service
public class CxcyTransformationServiceImpl implements ICxcyTransformationService 
{
    @Autowired
    private CxcyTransformationMapper cxcyTransformationMapper;

    /**
     * 查询成果转化申请
     * 
     * @param id 成果转化申请主键
     * @return 成果转化申请
     */
    @Override
    public CxcyTransformation selectCxcyTransformationById(Long id)
    {
        return cxcyTransformationMapper.selectCxcyTransformationById(id);
    }

    /**
     * 查询成果转化申请列表
     * 
     * @param cxcyTransformation 成果转化申请
     * @return 成果转化申请
     */
    @Override
    @DataScope(deptAlias = "cxcy_transformation", userAlias = "cxcy_transformation")
    public List<CxcyTransformation> selectCxcyTransformationList(CxcyTransformation cxcyTransformation)
    {
        return cxcyTransformationMapper.selectCxcyTransformationList(cxcyTransformation);
    }

    /**
     * 新增成果转化申请
     * 
     * @param cxcyTransformation 成果转化申请
     * @return 结果
     */
    @Override
    public int insertCxcyTransformation(CxcyTransformation cxcyTransformation)
    {
        return cxcyTransformationMapper.insertCxcyTransformation(cxcyTransformation);
    }

    /**
     * 修改成果转化申请
     * 
     * @param cxcyTransformation 成果转化申请
     * @return 结果
     */
    @Override
    public int updateCxcyTransformation(CxcyTransformation cxcyTransformation)
    {
        return cxcyTransformationMapper.updateCxcyTransformation(cxcyTransformation);
    }

    /**
     * 批量删除成果转化申请
     * 
     * @param ids 需要删除的成果转化申请主键
     * @return 结果
     */
    @Override
    public int deleteCxcyTransformationByIds(Long[] ids)
    {
        return cxcyTransformationMapper.deleteCxcyTransformationByIds(ids);
    }

    /**
     * 删除成果转化申请信息
     * 
     * @param id 成果转化申请主键
     * @return 结果
     */
    @Override
    public int deleteCxcyTransformationById(Long id)
    {
        return cxcyTransformationMapper.deleteCxcyTransformationById(id);
    }
}
